home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_ncurses.idb / usr / freeware / catman / u_man / cat1 / tput.Z / tput
Encoding:
Text File  |  1999-07-16  |  13.7 KB  |  265 lines

  1.  
  2.  
  3.  
  4.      ttttppppuuuutttt((((1111))))               UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV               ttttppppuuuutttt((((1111))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.       ttttppppuuuutttt - initialize a terminal or query    terminfo database
  10.  
  11.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.       ttttppppuuuutttt [----TTTT_t_y_p_e]    _c_a_p_n_a_m_e    [_p_a_r_m_s ... ]
  13.       ttttppppuuuutttt [----TTTT_t_y_p_e]    iiiinnnniiiitttt
  14.       ttttppppuuuutttt [----TTTT_t_y_p_e]    rrrreeeesssseeeetttt
  15.       ttttppppuuuutttt [----TTTT_t_y_p_e]    lllloooonnnnggggnnnnaaaammmmeeee
  16.       ttttppppuuuutttt ----SSSS  <<<<<<<<
  17.  
  18.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  19.       The ttttppppuuuutttt utility uses    the tttteeeerrrrmmmmiiiinnnnffffoooo database to make the
  20.       values of terminal-dependent capabilities and    information
  21.       available to the shell (see sssshhhh(1)), to initialize or reset
  22.       the terminal,    or return the long name    of the requested
  23.       terminal type.  ttttppppuuuutttt outputs a string    if the attribute
  24.       (_c_a_pability _n_a_m_e) is of type string, or an integer if    the
  25.       attribute is of type integer.     If the    attribute is of    type
  26.       boolean, ttttppppuuuutttt    simply sets the    exit code (0000 for TRUE if the
  27.       terminal has the capability, 1111 for FALSE if it does not),
  28.       and produces no output.  Before using    a value    returned on
  29.       standard output, the user should test    the exit code [$$$$????, see
  30.       sssshhhh(1)] to be sure it is 0000.  (See the EEEEXXXXIIIITTTT CCCCOOOODDDDEEEESSSS and
  31.       DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS sections.)  For a    complete list of capabilities
  32.       and the _c_a_p_n_a_m_e associated with each,    see tttteeeerrrrmmmmiiiinnnnffffoooo(5).
  33.  
  34.       ----TTTT_t_y_p_e
  35.            indicates the _t_y_p_e of terminal.    Normally this option
  36.            is unnecessary, because the default is taken from the
  37.            environment variable TTTTEEEERRRRMMMM.  If ----TTTT is specified, then
  38.            the shell variables LLLLIIIINNNNEEEESSSS and CCCCOOOOLLLLUUUUMMMMNNNNSSSS will be
  39.            ignored,and the operating system    will not be queried
  40.            for the actual screen size.
  41.  
  42.       _c_a_p_n_a_m_e
  43.            indicates the attribute from the    tttteeeerrrrmmmmiiiinnnnffffoooo database.
  44.  
  45.       _p_a_r_m_s
  46.            If the attribute    is a string that takes parameters, the
  47.            arguments _p_a_r_m_s will be instantiated into the string.
  48.            An all numeric argument will be passed to the attribute
  49.            as a number.
  50.  
  51.       ----SSSS   allows more than    one capability per invocation of ttttppppuuuutttt.
  52.            The capabilities    must be    passed to ttttppppuuuutttt from the
  53.            standard    input instead of from the command line (see
  54.            example).  Only one _c_a_p_n_a_m_e is allowed per line.     The
  55.            ----SSSS option changes the meaning of    the 0000 and 1111 boolean
  56.            and string exit codes (see the EXIT CODES section).
  57.  
  58.       iiiinnnniiiitttt If the tttteeeerrrrmmmmiiiinnnnffffoooo database    is present and an entry    for
  59.            the user's terminal exists (see ----TTTT_t_y_p_e, above), the
  60.  
  61.  
  62.  
  63.      Page 1                         (printed 5/12/99)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      ttttppppuuuutttt((((1111))))               UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV               ttttppppuuuutttt((((1111))))
  71.  
  72.  
  73.  
  74.            following will occur: (1) if present, the terminal's
  75.            initialization strings will be output (iiiissss1111, iiiissss2222,    iiiissss3333,
  76.            iiiiffff, iiiipppprrrroooogggg), (2) any delays (e.g., newline) specified in
  77.            the entry will be set in    the tty    driver,    (3) tabs
  78.            expansion will be turned    on or off according to the
  79.            specification in    the entry, and (4) if tabs are not
  80.            expanded, standard tabs will be set (every 8 spaces).
  81.            If an entry does    not contain the    information needed for
  82.            any of the four above activities, that activity will
  83.            silently    be skipped.
  84.  
  85.       rrrreeeesssseeeetttt
  86.            Instead of putting out initialization strings, the
  87.            terminal's reset    strings    will be    output if present
  88.            (rrrrssss1111, rrrrssss2222, rrrrssss3333, rrrrffff).  If    the reset strings are not
  89.            present,    but initialization strings are,    the
  90.            initialization strings will be output.  Otherwise,
  91.            rrrreeeesssseeeetttt acts identically to iiiinnnniiiitttt.
  92.  
  93.       lllloooonnnnggggnnnnaaaammmmeeee
  94.            If the tttteeeerrrrmmmmiiiinnnnffffoooo database    is present and an entry    for
  95.            the user's terminal exists (see ----TTTT_t_y_p_e above), then the
  96.            long name of the    terminal will be put out.  The long
  97.            name is the last    name in    the first line of the
  98.            terminal's description in the tttteeeerrrrmmmmiiiinnnnffffoooo database [see
  99.            tttteeeerrrrmmmm(5)].
  100.  
  101.      EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
  102.       ttttppppuuuutttt iiiinnnniiiitttt
  103.            Initialize the terminal according to the    type of
  104.            terminal    in the environmental variable TTTTEEEERRRRMMMM.  This
  105.            command should be included in everyone's    .profile after
  106.            the environmental variable TTTTEEEERRRRMMMM has been    exported, as
  107.            illustrated on the pppprrrrooooffffiiiilllleeee(4) manual page.
  108.  
  109.       ttttppppuuuutttt ----TTTT5555666622220000 rrrreeeesssseeeetttt
  110.            Reset an    AT&T 5620 terminal, overriding the type    of
  111.            terminal    in the environmental variable TTTTEEEERRRRMMMM.
  112.  
  113.       ttttppppuuuutttt ccccuuuupppp 0000 0000
  114.            Send the    sequence to move the cursor to row 0000, column 0000
  115.            (the upper left corner of the screen, usually known as
  116.            the "home" cursor position).
  117.  
  118.       ttttppppuuuutttt cccclllleeeeaaaarrrr
  119.            Echo the    clear-screen sequence for the current
  120.            terminal.
  121.  
  122.       ttttppppuuuutttt ccccoooollllssss
  123.            Print the number    of columns for the current terminal.
  124.  
  125.       ttttppppuuuutttt ----TTTT444455550000 ccccoooollllssss
  126.  
  127.  
  128.  
  129.      Page 2                         (printed 5/12/99)
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      ttttppppuuuutttt((((1111))))               UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV               ttttppppuuuutttt((((1111))))
  137.  
  138.  
  139.  
  140.            Print the number    of columns for the 450 terminal.
  141.  
  142.       bbbboooolllldddd====````ttttppppuuuutttt ssssmmmmssssoooo```` ooooffffffffbbbboooolllldddd====````ttttppppuuuutttt rrrrmmmmssssoooo````
  143.            Set the shell variables bbbboooolllldddd, to    begin stand-out    mode
  144.            sequence, and ooooffffffffbbbboooolllldddd, to end standout mode sequence,
  145.            for the current terminal.  This might be    followed by a
  146.            prompt: eeeecccchhhhoooo """"$$$${{{{bbbboooolllldddd}}}}PPPPlllleeeeaaaasssseeee ttttyyyyppppeeee    iiiinnnn yyyyoooouuuurrrr    nnnnaaaammmmeeee::::
  147.            $$$${{{{ooooffffffffbbbboooolllldddd}}}}\\\\cccc""""
  148.  
  149.       ttttppppuuuutttt hhhhcccc
  150.            Set exit    code to    indicate if the    current    terminal is a
  151.            hard copy terminal.
  152.  
  153.       ttttppppuuuutttt ccccuuuupppp 22223333 4444
  154.            Send the    sequence to move the cursor to row 23, column
  155.            4.
  156.  
  157.       ttttppppuuuutttt lllloooonnnnggggnnnnaaaammmmeeee
  158.            Print the long name from    the tttteeeerrrrmmmmiiiinnnnffffoooo database for the
  159.            type of terminal    specified in the environmental
  160.            variable    TTTTEEEERRRRMMMM.
  161.  
  162.       ttttppppuuuutttt ----SSSS <<<<<<<<!!!!
  163.       >>>> cccclllleeeeaaaarrrr
  164.       >>>> ccccuuuupppp    11110000 11110000
  165.       >>>> bbbboooolllldddd
  166.       >>>> !!!!
  167.  
  168.            This example shows tput processing several capabilities
  169.            in one invocation.  This    example    clears the screen,
  170.            moves the cursor    to position 10,    10 and turns on    bold
  171.            (extra bright) mode.  The list is terminated by an
  172.            exclamation mark    (!!!!) on a line by itself.
  173.  
  174.      FFFFIIIILLLLEEEESSSS
  175.       @@@@DDDDAAAATTTTAAAADDDDIIIIRRRR@@@@////tttteeeerrrrmmmmiiiinnnnffffoooo
  176.            compiled    terminal description database
  177.  
  178.       ////uuuussssrrrr////iiiinnnncccclllluuuuddddeeee////ccccuuuurrrrsssseeeessss....hhhh
  179.            ccccuuuurrrrsssseeeessss(3X) header file
  180.  
  181.       ////uuuussssrrrr////iiiinnnncccclllluuuuddddeeee////tttteeeerrrrmmmm....hhhh
  182.            tttteeeerrrrmmmmiiiinnnnffffoooo    header file
  183.  
  184.       @@@@DDDDAAAATTTTAAAADDDDIIIIRRRR@@@@////ttttaaaabbbbsssseeeetttt////****
  185.            tab settings for    some terminals,    in a format
  186.            appropriate to be output    to the terminal    (escape
  187.            sequences that set margins and tabs); for more
  188.            information, see    the "Tabs and Initialization" section
  189.            of tttteeeerrrrmmmmiiiinnnnffffoooo(4)
  190.  
  191.      SSSSEEEEEEEE AAAALLLLSSSSOOOO
  192.  
  193.  
  194.  
  195.      PPPPaaaaggggeeee 3333                         ((((pppprrrriiiinnnntttteeeedddd 5555////11112222////99999999))))
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.      ttttppppuuuutttt((((1111))))               UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV               ttttppppuuuutttt((((1111))))
  203.  
  204.  
  205.  
  206.       cccclllleeeeaaaarrrr(1), ssssttttttttyyyy(1), ttttaaaabbbbssss(5).  pppprrrrooooffffiiiilllleeee(5), tttteeeerrrrmmmmiiiinnnnffffoooo(4) in the
  207.       _S_y_s_t_e_m _A_d_m_i_n_i_s_t_r_a_t_o_r'_s _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l.  Chapter 10 of the
  208.       _P_r_o_g_r_a_m_m_e_r'_s _G_u_i_d_e.
  209.  
  210.      EEEEXXXXIIIITTTT CCCCOOOODDDDEEEESSSS
  211.       If _c_a_p_n_a_m_e is    of type    boolean, a value of 0000 is set for TRUE
  212.       and 1111    for FALSE unless the ----SSSS    option is used.
  213.  
  214.       If _c_a_p_n_a_m_e is    of type    string,    a value    of 0000 is    set if the
  215.       _c_a_p_n_a_m_e is defined for this terminal _t_y_p_e (the value of
  216.       _c_a_p_n_a_m_e is returned on standard output); a value of 1111    is set
  217.       if _c_a_p_n_a_m_e is    not defined for    this terminal _t_y_p_e (a null
  218.       value    is returned on standard    output).
  219.  
  220.       If _c_a_p_n_a_m_e is    of type    boolean    or string and the ----SSSS option is
  221.       used,    a value    of 0000 is    returned to indicate that all lines
  222.       were successful.  No indication of which line    failed can be
  223.       given    so exit    code 1111 will never appear.  Exit    codes 2222, 3333,
  224.       and 4444    retain their usual interpretation.
  225.  
  226.       If _c_a_p_n_a_m_e is    of type    integer, a value of 0000 is always    set,
  227.       whether or not _c_a_p_n_a_m_e is defined for    this terminal _t_y_p_e.
  228.       To determine if _c_a_p_n_a_m_e is defined for this terminal _t_y_p_e,
  229.       the user must    test the value of standard output.  A value of
  230.       ----1111 means that    _c_a_p_n_a_m_e    is not defined for this    terminal _t_y_p_e.
  231.  
  232.       Any other exit code indicates    an error; see the DIAGNOSTICS
  233.       section.
  234.  
  235.      DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  236.       ttttppppuuuutttt prints the following error messages and sets the
  237.       corresponding    exit codes.
  238.  
  239.       exit code   error message
  240.       0000          (_c_a_p_n_a_m_e is a numeric variable that is not specified in the
  241.               tttteeeerrrrmmmmiiiinnnnffffoooo(5) database for this terminal type, e.g.
  242.               ttttppppuuuutttt ----TTTT444455550000 lllliiiinnnneeeessss and ttttppppuuuutttt    ----TTTT2222666622221111 xxxxmmmmcccc)
  243.       1111          no error message is printed, see the EEEEXXXXIIIITTTT    CCCCOOOODDDDEEEESSSS section.
  244.       2222          usage error
  245.       3333          unknown terminal _t_y_p_e or no tttteeeerrrrmmmmiiiinnnnffffoooo database
  246.       4444          unknown tttteeeerrrrmmmmiiiinnnnffffoooo capability _c_a_p_n_a_m_e
  247.  
  248.      PPPPOOOORRRRTTTTAAAABBBBIIIILLLLIIIITTTTYYYY
  249.       The lllloooonnnnggggnnnnaaaammmmeeee and ----SSSS options, and the parameter-substitution
  250.       features used    in the ccccuuuupppp example, are    not supported in BSD
  251.       curses or in AT&T/USL    curses before SVr4.
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.      Page 4                         (printed 5/12/99)
  262.  
  263.  
  264.  
  265.